package com.woniu.zsd.platform.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.zsd.platform.dto.AccountDto;
import com.woniu.zsd.platform.model.Account;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Primary;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhangtao
 * @since 2025年02月18日
 */
@Mapper
@Primary
public interface AccountMapper extends BaseMapper<Account> {

    AccountDto selectAccountDtoByAccountId(Integer accountId);

    Page<AccountDto> selectAccount(Page<AccountDto> dtoPage, @Param("accountName") String accountName);

    @Select("SELECT account_name  FROM account WHERE status = 0")
    List<String> selectAccountNoRole();
}
